package com.sikaryofficial.qrcode.domain.mapping;

import com.sikaryofficial.qrcode.domain.mongo.ProductQrMongo;
import com.sikaryofficial.system.api.domain.ProductQr;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author : qinjinyuan
 * @desc : 协议映射
 * @date : 2023/11/03 9:19
 */
@Mapper
public interface ProductQrCodeMapping {
    ProductQrCodeMapping INSTANCE = Mappers.getMapper(ProductQrCodeMapping.class);
    /**
     * 实体映射resp
     *
     * @param protocol
     * @return
     */
    ProductQrMongo cover(ProductQr protocol);

    /**
     * resp映射实体
     *
     * @param protocol
     * @return
     */
    ProductQr coverEntity(ProductQrMongo protocol);

    /**
     * 实体映射resp
     *
     * @param protocol
     * @return
     */
    List<ProductQrMongo> coverList(List<ProductQr> protocol);
}
